package com.mlblog_springboot.web;

import com.mlblog_springboot.NotFoundException;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@Controller
public class IndexController {

    @GetMapping("/")
    public String main(){
//        String blog = null;
//        if (blog ==null){
//            throw  new NotFoundException("未找到博客");
//        }
        return "main";
    }

    @GetMapping("/blog")
    public String blog(){
//        String blog = null;
//        if (blog ==null){
//            throw  new NotFoundException("未找到博客");
//        }
        return "blog";
    }
}
